home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 6110 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.4 KB  |  44 lines

  1. Path: lynx.unm.edu!news
  2. From: rfalanga@numex.unm.edu (Rod Falanga)
  3. Newsgroups: comp.lang.c++,comp.os.ms-windows.programmer.tools
  4. Subject: Simple "Hello, World" program doesn't compile in VC++ 1.51.
  5. Date: Fri, 09 Feb 1996 23:19:58 GMT
  6. Organization: University of New Mexico, Albuquerque
  7. Message-ID: <4fgkrq$5mc@lynx.unm.edu>
  8. NNTP-Posting-Host: curry.unm.edu
  9. X-Newsreader: Forte Free Agent 1.0.82
  10.  
  11. A co-worker of mine is taking a C++ class.  She's asked to use my PC,
  12. where I've got Visual C++ 1.51 loaded (I've got Windows for Workgroups
  13. on this PC).  Her class will not be using Windows or anything like
  14. that at all.  She's got a simple "Hello, World" application, which
  15. will not compile.  The code looks like this:
  16.  
  17. #include <iostream.h>
  18.  
  19. int
  20. main()
  21. {
  22. cout << "Hello World" << endl;
  23. return 0;
  24. }
  25.  
  26.  
  27. As you can see, straight forward.
  28.  
  29. I've set up this application in VC++ 1.51 to be a MS-DOS program,
  30. which does NOT use MFC.  When I've compiled it, I've gotten over 100
  31. error messages, things like "'class' is followed by 'streambuf'"
  32. (C2282), "expected '(' to follow 'inline'" (C2054), etc.  And all of
  33. these complaints come from VC++'s IOS.H file?!
  34.  
  35. What's wrong?  What do I do about it?
  36.  
  37. Rod
  38.  
  39. Rod Falanga                     | (voice) 505-841-2511  (FAX) 505-841-2543
  40. Scientific Laboratory Division  | rfalanga@numex.unm.edu
  41. P.O. Box 4700                   |
  42. Albuquerque, NM 87196-4700      | The opinions expressed are mine alone.
  43.  
  44.